<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>

<div class="block clearfix">
    
    <div class="block_head">
        <div class="bheadl"></div>
        <div class="bheadr"></div>
        
        <logic:lessThan name="groupForm" property="groupID" value="1">
            <h2>Add Group</h2>
        </logic:lessThan>
        <logic:greaterThan name="groupForm" property="groupID" value="0">
            <h2>Edit Group "<bean:write name="groupForm" property="groupName"/>"</h2>
        </logic:greaterThan>
        
    </div>
    <!-- .block_head ends -->

    
    <div class="block_content clearfix">
        <html:form styleClass="validate-form" action="admin/group.do" method="post">
            
            <logic:notEmpty name="errorMessage" >
                <div class="message errormsg"><p><bean:write name="errorMessage"/></p></div>
            </logic:notEmpty>
            <logic:notEmpty name="successMessage" >
                <div class="message success"><p><bean:write name="successMessage"/></p></div>
            </logic:notEmpty>
            
            <html:hidden property="groupID" />
            <p>
                <label for="groupName">Group Name:</label><span class="required">*</span><br/>
                <html:text styleId="groupName" styleClass="text medium required" property="groupName"
                           title="Please enter the group name!"/>
            </p>
            
            <hr/>
            
            <p>
                <html:submit property="action" value="Save" styleClass="submit small"/>
                <logic:greaterThan name="groupForm" property="groupID" value="2">
                    <html:link action="/admin/groupListing.do?action=delete" paramId="groupID" paramName="groupForm" paramProperty="groupID" styleClass="confirm-button submit small red">Delete</html:link>
                </logic:greaterThan>                
                <html:link action="/admin/groupListing.do" styleClass="submit small gray">Cancel</html:link>
            </p>
            
            
        </div>
        <!-- .block_content ends -->
    </html:form>
        
    <div class="bendl"></div>
    <div class="bendr"></div>
    
</div>
<!-- .block ends -->
